// 定义设备数据接口
export interface Device {
  key: string;
  index: number;
  name: string;
  sn: string;
  protocol: string;
  dataCycle: string;
  project: string;
  dataManagement: string;
}

export interface DeviceRecord {
  key: string;
  id: string;
  name: string;
}

// 定义扩展信息接口
export interface ExtendedInfo {
  key: string;
  index: number;
  name: string;
  type: string;
  enabled: boolean;
}

// 定义从设备节点接口
export interface SlaveNode {
  key: string;
  id: string;
  name: string;
  type: string;
  slaveAddress: string;
  register: string;
  createTime: string;
}

// 定义节点表单值接口
export interface NodeFormValues {
  name: string;
  slaveAddress: string;
  register: string;
  addressType?: string;
}

// 定义设备表单值接口
export interface DeviceFormValues {
  project: string;
  deviceName: string;
  deviceSN: string;
  group?: string;
  productTemplate?: string;
  protocol: string;
  latitude?: number;
  longitude?: number;
  port?: number;
}

// 定义扩展信息表单值接口
export interface ExtendedInfoFormValues {
  name: string;
  type: string;
  defaultValue?: string;
  unit?: string;
  max?: number;
  min?: number;
  description?: string;
}

// 定义数据管理表单值接口
export interface DataManagementFormValues {
  dataName: string;
  dataKey: string;
  readWriteMode: string;
  dataFormat: string;
  byteOrder: string;
  storage: string;
  precision: number;
  formulaToDevice?: string;
  formulaToPlatform?: string;
}

// 定义产品模板表单值接口
export interface ProductTemplateFormValues {
  productTemplate: string;
  slaveAddress: string;
}